<?php
class Url extends Doctrine_Record {
		
	public function setTableDefinition() {
    $this->hasColumn('url', 'string', 255,
    	array(
				'notnull' => true,
      )
    );
    
    $this->hasColumn('document_id', 'integer', 4,
    	array(
				'notnull' => true,
    		'comment' => 'id del documento al que pertenece la url'
      )
    );
    
	}
	
	public function setUp() {
		$this->hasOne('Document as document', 
			array(
				'local' => 'document_id',
				'foreign' => 'id',
				'onDelete' => 'CASCADE' 
			)
		);
	}

}